/*
  FSKModem.h - Software FSK modem library
  Copyright (c) 2010 Akihiro Uehara.  All right reserved.
  
  TBD:License
  
*/

#ifndef FSKModem_h
#define FSKModem_h

#include <WProgram.h>

class FSKModem {
  private:
    uint8_t _rx_pin;
    uint8_t _tx_pin;
    boolean _is_heigh;
    boolean _carrier_detected;
    int _rx_average;
    unsigned long _time;
//    void printNumber(unsigned long, uint8_t);
    int readPulse();
    int readByte();
    void sendBit(byte data);
  
  public:
    FSKModem(uint8_t, uint8_t);
    void begin();
    int  read();
    void print(char);
  /*
    void print(const char[]);
    void print(uint8_t);
    void print(int);
    void print(unsigned int);
    void print(long);
    void print(unsigned long);
    void print(long, int);
    void println(void);
    void println(char);
    void println(const char[]);
    void println(uint8_t);
    void println(int);
    void println(long);
    void println(unsigned long);
    void println(long, int);*/
};

#endif //FSKModem_h

